import request from "../utils/request.js";

// 简历添加
export function resume(data) {
  return request({
    url: `/resume`,
    method: "post",
    data,
  });
}
// 在线简历查看
export function onLineResume(params) {
  return request({
    url: `/resume/onLineResume`,
    method: "get",
    params,
  });
}
// 添加工作经历
export function addResumeWork(data) {
  return request({
    url: `/resumeWork`,
    method: "post",
    data,
  });
}
// 编辑工作经历
export function editResumeWork(data) {
  return request({
    url: `/resumeWork`,
    method: "put",
    data,
  });
}
// 删除工作经历
export function delResumeWork(id) {
  return request({
    url: `/resumeWork/${id}`,
    method: "delete",
  });
}
// 职业树形图
export function findProfessionTree(params) {
  return request({
    url: `/serve/findProfessionTree`,
    method: "get",
    params,
  });
}
// 专业树形图

export function majorTree(params) {
  return request({
    url: `/major/treeList`,
    method: "get",
    params,
  });
}
// 添加教育经历
export function addResumeEducation(data) {
  return request({
    url: `/resumeEducation`,
    method: "post",
    data,
  });
}
// 编辑教育经历
export function editResumeEducation(data) {
  return request({
    url: `/resumeEducation`,
    method: "put",
    data,
  });
}
// 删除教育经历
export function delResumeEducation(id) {
  return request({
    url: `/resumeEducation/${id}`,
    method: "delete",
  });
}
// 编辑优势

export function editAdvantage(data) {
  return request({
    url: `/resume/editAdvantage`,
    method: "put",
    data,
  });
}
// 添加期望职位
export function saveResumeExpect(data) {
  return request({
    url: `/resumeExpect`,
    method: "post",
    data,
  });
}
// 编辑期望职位
export function editResumeExpect(data) {
  return request({
    url: `/resumeExpect`,
    method: "put",
    data,
  });
}
// 删除期望职位
export function deleteResumeExpect(id) {
  return request({
    url: `/resumeExpect/${id}`,
    method: "delete",
  });
}
// 获取期望职位列表
export function getResumeExpect(params) {
  return request({
    url: `/resumeExpect`,
    method: "get",
    params,
  });
}
// 获取期望职位详情
export function resumeExpectDetail(id) {
  return request({
    url: `/resumeExpect/${id}`,
    method: "get",
  });
}
// 编辑求职状态
export function editSeekJobStatus(data) {
  return request({
    url: `/resume/editSeekJobStatus`,
    method: "put",
    data,
  });
}
// 编辑证书
export function editCertificate(data) {
  return request({
    url: `/resume/editCertificate`,
    method: "put",
    data,
  });
}
// 编辑个人信息

export function editPersonalInfo(data) {
  return request({
    url: `/resume/editPersonalInfo`,
    method: "put",
    data,
  });
}
// 编辑联系方式
export function editLink(data) {
  return request({
    url: `/resume/editLink`,
    method: "put",
    data,
  });
}
// 岗位关键字
export function positionKey(params) {
  return request({
    url: `/positionKey`,
    method: "get",
    params,
  });
}
// 添加岗位关键字
export function savePositionKey(data) {
  return request({
    url: `/positionKey`,
    method: "post",
    data,
  });
}
// 删除岗位关键字
export function delPositionKey(id) {
  return request({
    url: `/positionKey/${id}`,
    method: "delete",
  });
}
// 获取电子简历列表
export function getResumeElectronic(params) {
  return request({
    url: `/resumeElectronic`,
    method: "get",
    params,
  });
}
// 添加电子简历列表
export function addResumeElectronic(data) {
  return request({
    url: `/resumeElectronic`,
    method: "post",
    data,
  });
}
// 获取个人电子简历列表
export function getResumeElectronicPer(params) {
  return request({
    url: `/resumeElectronic/getListByUserId`,
    method: "get",
    params,
  });
}
// 删除电子简历
export function delResumeElectronic(id) {
  return request({
    url: `/resumeElectronic/${id}`,
    method: "delete",
  });
}
// 获取牛人在线简历
export function pcResumeDetail(userId) {
  return request({
    url: `/resume/pcResumeDetail/${userId}`,
    method: "get",
  });
}
// 简历与岗位绑定
export function resumeExpectBind(data) {
  return request({
    url: `/resumeExpect/bind`,
    method: "post",
    data,
  });
}
// 简历与岗位解绑
export function resumeExpectUnBind(data) {
  return request({
    url: `/resumeExpect/unBind`,
    method: "post",
    data,
  });
}
